package com.pine.app.module.security.oauth.handler;

import com.pine.app.module.security.oauth.annotation.FrameworkEndpoint;
import com.pine.app.module.security.oauth.plugin.Plugin;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @author xiaoyuan
 * @create 2020/3/18 14:02
 **/
@FrameworkEndpoint
public class AuthticationHandler {



    @GetMapping(value = "/login")
    @Plugin("loginPage")
    public String loginPage(HttpServletRequest request, ModelMap model) {
        return "login/login";
    }


    @PostMapping(value = "/login")
    @Plugin("loginAPI")
    public String login() {


        return "login/login";
    }
}
